package com.yishun.springboot.mapper;

import java.util.List;
import java.util.Map;
import java.util.Set;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import com.yishun.springboot.pojo.Permissions;

@Mapper
public interface PermissionMapper {
	Set<String> getPermissionByUsername(@Param("ridOrUserIds") List<Integer> ridOrUserIds,
			@Param("ridOrUserName") String ridOrUserName);

	Integer addTbRolesPermission(@Param("tbRolesPermissionList") List<Map<String, Object>> tbRolesPermissionList,
			@Param("ridOrUserName") String ridOrUserName);

	Integer delTbRolesPermission(@Param("ridOrUserName") String ridOrUserName);

	Integer addTbPermissions(Permissions permissions);

	Integer addTbMenuPermission(@Param("menuId") Integer menuId, @Param("permissionId") Integer permissionId);

	Integer delTbPermissions(@Param("permissionId") Integer permissionId);
}
